<!--
  Generated template for the Login page.

  See http://ionicframework.com/docs/v2/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

	<ion-navbar>
		<ion-title>login</ion-title>
	</ion-navbar>

</ion-header>


<ion-content padding>
	<form [formGroup]="loginForm" (ngSubmit)="logForm()">
		<ion-item>
			<ion-label>Username</ion-label>
			<ion-input type="text" formControlName="LoginID"></ion-input>
		</ion-item>
		<p *ngIf="!loginForm.controls.LoginID.valid && loginForm.controls.LoginID.touched" color="danger">LoginID must is email.</p>
		<!-- <p *ngIf="loginForm.controls.LoginID.valid && loginForm.controls.LoginID.touched" secondary> LoginID is good</p>-->

		<ion-item>
			<ion-label>Password</ion-label>
			<ion-input type="password" formControlName="LoginPwd"></ion-input>
		</ion-item>
		<button ion-button full (click)="login(loginForm.value, $event)" [disabled]="!loginForm.valid">Dark</button>
		<button ion-button full (click)="signup()">Create Account</button>
	</form>
</ion-content>